package com.lb.jwitter;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.ForeignKey;
 
@Entity
@Table (name="tbl_dkmh_hocvien_monhoc_duocdk")
public class Tbl_DKMH_HocVien_MonHoc_DuocDK implements Serializable {
   private static final long serialVersionUID = -1989579066723007050L;

   private Long id;
   private Tbl_ThongTin_HocVien hocVienId = null;
   private Tbl_CTDT_MonHoc monHocId = null;
   private Boolean duocYN;

   @Id
   @GeneratedValue
   public Long getId() {
	    return id;
   }
   public void setId(Long id) {
	    this.id= id;
   }

   @ManyToOne(fetch=FetchType.EAGER)
   @JoinColumn(name="hocVienId")
   @ForeignKey(name="FK_tbl_Tbl_ThongTin_HocVien_tbl_DKMH_hocVien_MonHoc_DuocDK")
   public Tbl_ThongTin_HocVien getHocVienId() {
	    return hocVienId;
   }
   public void setHocVienId(Tbl_ThongTin_HocVien hocVienId) {
	    this.hocVienId=hocVienId;
   }

   @ManyToOne(fetch=FetchType.EAGER)
   @JoinColumn(name="monHocId")
   @ForeignKey(name="FK_tbl_CTDT_MonHoc_tbl_DKMH_hocVien_MonHoc_DuocDK")
   public Tbl_CTDT_MonHoc getMonHocId() {
	    return monHocId;
   }
   public void setMonHocId(Tbl_CTDT_MonHoc monHocId) {
	    this.monHocId=monHocId;
   }

   public Boolean getDuocYN() {
   	return duocYN;
   }
   public void setDuocYN(Boolean duocYN) {
   	this.duocYN= duocYN;
   }
}//endClass 

